
# json中的load方法

"""
load() : 将JSON文件的数据读取出来转化为python对象
"""

import json

# with open('test_data.json',encoding='utf-8') as f:
#     result = json.load(f)
#     print("从JSON文件读取的数据类型为:{}".format(type(result)))
#     print(result)


with open('test_data.json',encoding='utf-8') as f:
    result = f.read()
    print("读取出来的数据类型为:{}".format(type(result)))
    print(result)

    res1 = json.loads(result)
    print(res1)


